/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Harold
 */
@Entity
@Table(name = "in_type_space")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "InTypeSpace.findAll", query = "SELECT i FROM InTypeSpace i"),
    @NamedQuery(name = "InTypeSpace.findByIdTypeSpace", query = "SELECT i FROM InTypeSpace i WHERE i.idTypeSpace = :idTypeSpace"),
    @NamedQuery(name = "InTypeSpace.findByDescription", query = "SELECT i FROM InTypeSpace i WHERE i.description = :description"),
    @NamedQuery(name = "InTypeSpace.findByStatus", query = "SELECT i FROM InTypeSpace i WHERE i.status = :status")})
public class InTypeSpace implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_type_space")
    private Integer idTypeSpace;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @NotNull
    @Column(name = "status")
    private boolean status;

    public InTypeSpace() {
    }

    public InTypeSpace(Integer idTypeSpace) {
        this.idTypeSpace = idTypeSpace;
    }

    public InTypeSpace(Integer idTypeSpace, String description, boolean status) {
        this.idTypeSpace = idTypeSpace;
        this.description = description;
        this.status = status;
    }

    public Integer getIdTypeSpace() {
        return idTypeSpace;
    }

    public void setIdTypeSpace(Integer idTypeSpace) {
        this.idTypeSpace = idTypeSpace;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTypeSpace != null ? idTypeSpace.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InTypeSpace)) {
            return false;
        }
        InTypeSpace other = (InTypeSpace) object;
        if ((this.idTypeSpace == null && other.idTypeSpace != null) || (this.idTypeSpace != null && !this.idTypeSpace.equals(other.idTypeSpace))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.InTypeSpace[ idTypeSpace=" + idTypeSpace + " ]";
    }
    
}
